import requests

res = requests.get(
    url="https://www.zhihu.com/api/v4/comment_v5/answers/2515342016/root_comment?order_by=score&limit=20&offset=",
    headers={
        "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Firefox/102.0",
    }
)

# 响应体
res.encoding = 'utf-8'
print(res.text)

# 响应头
print(res.headers)